package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CommodityControllerMapper;
import com.ruoyi.system.domain.CommodityController;
import com.ruoyi.system.service.ICommodityControllerService;

/**
 * 商品列表Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-18
 */
@Service
public class CommodityControllerServiceImpl implements ICommodityControllerService 
{
    @Autowired
    private CommodityControllerMapper commodityControllerMapper;

    /**
     * 查询商品列表
     * 
     * @param commodityId 商品列表主键
     * @return 商品列表
     */
    @Override
    public CommodityController selectCommodityControllerByCommodityId(Long commodityId)
    {
        return commodityControllerMapper.selectCommodityControllerByCommodityId(commodityId);
    }

    /**
     * 查询商品列表列表
     * 
     * @param commodityController 商品列表
     * @return 商品列表
     */
    @Override
    public List<CommodityController> selectCommodityControllerList(CommodityController commodityController)
    {
        return commodityControllerMapper.selectCommodityControllerList(commodityController);
    }

    /**
     * 新增商品列表
     * 
     * @param commodityController 商品列表
     * @return 结果
     */
    @Override
    public int insertCommodityController(CommodityController commodityController)
    {
        return commodityControllerMapper.insertCommodityController(commodityController);
    }

    /**
     * 修改商品列表
     * 
     * @param commodityController 商品列表
     * @return 结果
     */
    @Override
    public int updateCommodityController(CommodityController commodityController)
    {
        return commodityControllerMapper.updateCommodityController(commodityController);
    }

    /**
     * 批量删除商品列表
     * 
     * @param commodityIds 需要删除的商品列表主键
     * @return 结果
     */
    @Override
    public int deleteCommodityControllerByCommodityIds(Long[] commodityIds)
    {
        return commodityControllerMapper.deleteCommodityControllerByCommodityIds(commodityIds);
    }

    /**
     * 删除商品列表信息
     * 
     * @param commodityId 商品列表主键
     * @return 结果
     */
    @Override
    public int deleteCommodityControllerByCommodityId(Long commodityId)
    {
        return commodityControllerMapper.deleteCommodityControllerByCommodityId(commodityId);
    }
}
